package com.maoning.gulimallcart.vo;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 购物项vo
 * @Author : 猫宁
 * @Date: 2022/4/5
 * 这里雷神怕lombok注解把自定义的get方法覆盖,所以去掉了,我们这里试一下
 */
@Data
public class CartItem {
    private Long skuId;
    private Boolean check = true;
    private String title;
    private String image;
    private List<String> skuAttr;
    private BigDecimal price;
    private Integer cout;
    private BigDecimal totalPrice;

    public BigDecimal getTotalPrice() {
        return this.price.multiply(new BigDecimal(this.cout));
    }

}
